package com.mycom.service.impl;

import com.mycom.dao.TeamSaveForm2Dao;
import com.mycom.pojo.TeamSaveForm2;
import com.mycom.service.TeamSaveForm2Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeamSaveForm2ServiceImpl implements TeamSaveForm2Service {
    @Autowired
    private TeamSaveForm2Dao teamSaveForm2Dao;

    @Override
    public boolean save(TeamSaveForm2 teamSaveForm2) {
        return teamSaveForm2Dao.save(teamSaveForm2)>0 ? true : false;
    }

    @Override
    public boolean deleteByFormNumber(String formNumber) {
        return teamSaveForm2Dao.deleteByFormNumber(formNumber)>=0 ? true : false;
    }

    public List<TeamSaveForm2> findByIdCardNumber(String idCardNumber){
        return teamSaveForm2Dao.findByIdCardNumber(idCardNumber);
    }

    @Override
    public TeamSaveForm2 findByFormNumber(String formNumber) {
        return teamSaveForm2Dao.findByFormNumber(formNumber);
    }

    @Override
    public boolean deleteMany(String[] formNumbers) {
        return teamSaveForm2Dao.deleteMany(formNumbers) >= 0 ? true : false ;
    }
}
